package com.farmer.controller;

import com.farmer.pojo.Admin;
import com.farmer.pojo.Menu;
import com.farmer.pojo.TreeResult;
import com.farmer.service.MenuService;
import jakarta.servlet.http.HttpSession;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@CrossOrigin
@RequestMapping("menuInfo")
public class MenuController {

//    //声明业务层属性
//    @Autowired
//    private MenuService menuService;
//    public List<TreeResult> MenuInfo(String id, HttpSession httpSession){
//        //获取当前session中当前登录的用户id
//        Admin admin = (Admin) httpSession.getAttribute("admin");
//        Integer rid = admin.getRid();
////        回去当前用户的子菜单信息
//        List<TreeResult> menus = menuService.selMenuInfoByRidPidMapper(rid, id);
//        return menus;
    }

